package hibernate;

import java.util.List;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.query.NativeQuery;

public class Hibernate {

	public static void main(String[] args) {
		SessionFactory sf = new Configuration().configure().buildSessionFactory();
		Session session = sf.openSession();

		
		NativeQuery query = session.createNativeQuery("select * from player");
		
		List list = query.getResultList();
		
		
		System.out.println("find records in"+list.size());
		session.close();

	}

}
